package org.example.job;

import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Author: WangShengJie
 * @Date: 2025/6/7
 */
@Component
public class ScheduleDemo {


    @Scheduled(cron = "* * * * * ?")
//    @Async
    //使用@Async注解需要自定线程池。推荐通过ThreadPoolTaskExecutor自定义核心线程数、队列容量等
    public void printDemo() {
        System.out.println("*****");
    }
}
